package creatorMode.abstractFactory;

import java.util.EnumMap;

import static creatorMode.abstractFactory.brand.LINING;
import static creatorMode.abstractFactory.brand.NIKE;

public class clothingDom {
    private pants pants;
    private shoes shoes;
    private shirt shirt;


      final  static EnumMap<brand,abstractFactory> map=new EnumMap<>(brand.class);
      static{
          map.put(LINING, new LiNingFactory());
          map.put(NIKE,new NikeFactory());
      }

static class factoryMaker{

          public static abstractFactory getFactory(brand brand){

return map.get(brand);

    }

    }

    public creatorMode.abstractFactory.pants getPants() {
        return pants;
    }

    public void setPants(creatorMode.abstractFactory.pants pants) {
        this.pants = pants;
    }

    public creatorMode.abstractFactory.shoes getShoes() {
        return shoes;
    }

    public void setShoes(creatorMode.abstractFactory.shoes shoes) {
        this.shoes = shoes;
    }

    public creatorMode.abstractFactory.shirt getShirt() {
        return shirt;
    }

    public void setShirt(creatorMode.abstractFactory.shirt shirt) {
        this.shirt = shirt;
    }

}

